<? if(empty($page)): ?>
	<h1>Nova stranica</h1>
<? else: ?>
	<h1>Izmena stranice #<?= $page['Page']['id'] ?></h1>
<? endif; ?>

<?= $this->Form->create('Page', array('url'=>'/admin_pages/save')) ?>

	<?= $this->Form->hidden('id', array('value'=>@$page['Page']['id'])) ?>

	<?= $this->Form->label("title", "Naslov:") ?>
	<?= $this->Form->text("title", array('value'=>@$page['Page']['title'], 'class'=>'large')) ?>
	<?= $this->Form->error('title', null, array('wrap'=>'span')) ?>

	<?= $this->Form->label("content", "Sadržaj:") ?>
	<?= $this->Form->textarea("content", array('value'=>@$page['Page']['content'], 'class'=>"editable")) ?>

	<br clear="all">
	<?= $this->Form->submit('Sačuvaj', array('div'=>false)) ?>
	<?= $this->Form->submit('Poništi', array('onclick'=>"location.href='/admin_pages'", 'type'=>'button', 'div'=>false)) ?>

<?= $this->Form->end() ?>